<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Support\Facades\Validator;
use Throwable;

class ValidatorException extends Exception
{
    protected $validator;

    public function __construct($validator = null, string $message = "", int $code = 0, Throwable $previous = null)
    {
        $this->validator = $validator;
        parent::__construct($message, $code, $previous);
    }

    public function validator()
    {
        return $this->validator;
    }
}
